<!-- 条目修改 -->
<div class="modal-dialog modal-lg">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span aria-hidden="true">&times;</span>
      </button>
      <h4 class="modal-title">条目修改</h4>
    </div>

    <div class="modal-body">
      <form class="form-inline">
        <div class="box-body">
          <div class="form-group col-lg-12" style="padding-left:0px !important;margin-bottom:8px;">
            <label class="control-label" style="padding-left:4px">指定是否有效：</label>
            <select class="form-control" style="min-width:150px" [(ngModel)]="dataInfo.sValid" name="sValid" (ngModelChange)="changeCheckedInfo('sValid')">
              <option [value]="1">有效</option>
              <option [value]="0">无效</option>
            </select>
            <label class="control-label">风控条目属性：</label>
            <select class="form-control" style="min-width:182px" [(ngModel)]="dataInfo.sItemType" name="sItemType" (ngModelChange)="changeCheckedInfo('sItemType')">
              <option [value]="''" selected="selected">--请选择--</option>
              <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.QDII_RECORD_TYPE">{{item.sItemValue}}</option>
            </select>
            <label class="control-label">条款出处：</label>
            <!-- <select class="form-control" style="min-width:182px" [(ngModel)]="dataInfo.sFileSource" name="sFileSource" (ngModelChange)="changeCheckedInfo('sFileSource')">
              <option [value]="''" selected="selected">--请选择--</option>
              <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.NX_SOURCE">{{item.sItemValue}}</option>
            </select> -->
            <input class="form-control" placeholder="条款出处" [(ngModel)]="dataInfo.sFileSource" name="sFileSource">
            <button type="button" class="btn btn-primary" (click)="changeCheckedInfo('sFileSource')">确定</button>
          </div>
          <div class="form-group col-lg-12" style="padding-left:0px !important;margin-bottom:8px;">
            <label class="control-label">适用QDII类别：</label>
            <!-- <select style="width:150px;" class="form-control select2 fields-select" multiple="multiple" [(ngModel)]="dataInfo.sFundType"
              name="sFundType" (ngModelChange)="changeCheckedInfo('sFundType')">
              <option [value]="item.sItemValue" *ngFor="let item of dictionaryList.QD_ACCOUNT_TYPE">{{item.sItemValue}}</option>
            </select> -->
            <select [(ngModel)]="dataInfo.sFundType" name="sFundType" id="QDIIEntryChangeFundType" (ngModelChange)="changeCheckedInfo('sFundType')"
              multiple></select>

            <label class="control-label">文件名称：</label>
            <input class="form-control" placeholder="文件名称" [(ngModel)]="dataInfo.sFileName" name="sFileName">
            <button type="button" class="btn btn-primary" (click)="changeCheckedInfo('sFileName')">确定</button>
          </div>
          <div class="form-group col-lg-12" style="padding-left:0px !important;">

            <label class="control-label">适用QDII名称：</label>
            <div class="input-group" (click)="showApplyQDIIName()">
              <input class="form-control" disabled placeholder="适用QDII名称" [(ngModel)]="dataInfo.sFundGroupdsZh" name="sFundGroupdsZh" (ngModelChange)="changeCheckedInfo('sFundGroupdsZh')">
              <div class="input-group-addon" (click)="showApplyQDIIName()">
                <i class="fa fa-search"></i>
              </div>
            </div>
            <!-- <button type="button" class="btn btn-primary" style="margin-left:10px;" (click)="addRow()">
              <i class="fa fa-search"></i>新增一行</button>
            <button type="button" class="btn btn-primary" style="margin-left:10px;" (click)="delRow()">
              <i class="fa fa-search"></i>删除行</button> -->
          </div>

        </div>

      </form>

      <div class="ibt-fixed-table-container" style="height:350px;">
        <!-- <div class="table-scroll-content"> -->
          <table id="input-table" class="table table-bordered table-hover table-striped table-keep-line" style="margin-top:unset !important;">
            <thead>
              <tr role="row">
                <th style="width:50px !important">
                  <div class="cell">
                    <div class="checkbox checkbox-primary">
                      <input type="checkbox" id="isCheckedAll" [(ngModel)]="isCheckedAll" name="isCheckedAll" (ngModelChange)="checkedAll()">
                      <label>
                      </label>
                    </div>
                  </div>
                </th>
                <th style="width:60px !important">
                  <div class="cell cell-padding">序号</div>
                </th>
                <th style="width:60px !important">
                  <div class="cell cell-padding">编号</div>
                </th>
                <th style="width:70px !important">
                  <div class="cell">是否有效</div>
                </th>
                <th>
                  <div class="cell-padding">条款出处</div>
                </th>
                <th>
                  <div class="cell-padding">文件名称</div>
                </th>

                <th>
                  <div class="cell-padding">属性</div>
                </th>

                <th>
                  <div class="cell-padding">适用QDII类别</div>
                </th>
                <th>
                  <div class="cell-padding">适用QDII名称</div>
                </th>
                <th>
                  <div class="cell-padding">内容</div>
                </th>
                <th>
                  <div class="cell-padding">指标释义</div>
                </th>
                <th style="width:169px !important">
                  <div class="cell-padding">bloomberg系统能否控制</div>
                </th>
                <th>
                  <div class="cell-padding">系统设置代码</div>
                </th>
                <th>
                  <div class="cell-padding">阀值</div>
                </th>
                <th style="width:130px !important">
                  <div class="cell-padding">人工控制方法说明</div>
                </th>
                <th style="width:130px !important">
                  <div class="cell-padding">系统实施相关条件</div>
                </th>
                <th>
                  <div class="cell-padding">备注1</div>
                </th>
                <th>
                  <div class="cell-padding">备注2</div>
                </th>


              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let item of listData;let index = index;">
                <!-- <tr  > -->
                <td style="width:50px !important">
                  <div class="cell">
                    <div class="checkbox checkbox-primary">
                      <input type="checkbox" name="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll()">
                      <label>
                      </label>
                    </div>
                  </div>
                </td>
                <td style="width:60px !important" class="td-padding">
                  {{index+1}}
                </td>
                <td style="width:60px !important">
                  <div class="cell">
                    {{item.nQdId}}
                  </div>
                </td>
                <td style="width:70px !important">
                  <div class="cell">
                    <div id="sValid"></div>
                    <select class="select-margin input-width" [(ngModel)]="listData[index].sValid" (ngModelChange)="inputChange(index,listData[index].sValid,'sValid')">
                      <option [value]="1">有效</option>
                      <option [value]="0">无效</option>
                    </select>
                  </div>
                </td>
                <td>
                  <!-- <div>
                      <input class="input-width cell" maxlength="100" value="{{item.sFileSource}}">
                    </div> -->
                  <div class="cell">
                    <div id="sFileSource"></div>
                    <input class="select-margin input-width" name="sFileSource" [(ngModel)]="listData[index].sFileSource" (ngModelChange)="inputChange(index,listData[index].sFileSource,'sFileSource')">
                    <!-- <select class="select-margin input-width" name="sFileSource" [(ngModel)]="listData[index].sFileSource" (ngModelChange)="inputChange(index,listData[index].sFileSource,'sFileSource')">
                      <option [value]="''" selected="selected">--请选择--</option>
                      <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.NX_SOURCE">{{item.sItemValue}}</option>
                    </select> -->
                    <!-- <input class="input-width cell" maxlength="100" [(ngModel)]="listData[index].sFileSource"> -->
                  </div>
                </td>
                <td>
                  <div class="cell">
                    <div id="sFileName"></div>
                    <input class="input-width" maxlength="100" name="sFileName" [(ngModel)]="listData[index].sFileName" (ngModelChange)="inputChange(index,listData[index].sFileName,'sFileName')">
                  </div>
                </td>
                <td>
                  <!-- <div>
                      <input class="input-width cell" maxlength="100" [(ngModel)]="listData[index].sItemType">
                    </div> -->
                  <div class="cell">
                    <div id="sItemType"></div>
                    <select class="select-margin input-width" [(ngModel)]="listData[index].sItemType" name="sItemType" (ngModelChange)="inputChange(index,listData[index].sItemType,'sItemType')">
                      <option [value]="''" selected="selected">--请选择--</option>
                      <option [value]="it.sItemKey" *ngFor="let it of dictionaryList.QDII_RECORD_TYPE">{{it.sItemValue}}</option>
                    </select>
                    <!-- <input class="input-width cell" maxlength="100"> -->
                  </div>
                </td>
                <td>
                  <!-- <div>
                      <input class="input-width cell" maxlength="100" [(ngModel)]="listData[index].sFundType">
                    </div> -->
                  <div class="cell" style="height:32px !important;">
                    <!-- <select class="select-margin input-width cell" [(ngModel)]="listData[index].sFundType">
                        <option [value]="''" selected="selected">--请选择--</option>
                        <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.QD_ACCOUNT_TYPE">{{item.sItemValue}}</option>
                      </select> -->
                    <!-- <input class="input-width cell" maxlength="100" [(ngModel)]="listData[index].sFundType"> -->
                    <!-- <div id="sFundType"></div>
                      <select style="width:100px !important;" class="select-margin input-width" [(ngModel)]="listData[index].sFundType" name="sFundType" (ngModelChange)="inputChange(index,listData[index].sFundType,'sFundType')"
                        id="QDIIInputFundType{{index}}" multiple></select> -->
                    <p-multiSelect [options]="dictionaryInfo" defaultLabel="请选择" [(ngModel)]="listData[index].sFundType" [maxSelectedLabels]="9999"
                      [ngModelOptions]="{standalone: true}"></p-multiSelect>
                  </div>
                </td>
                <td>

                  <!-- <input class="input-width cell" maxlength="100" [(ngModel)]="listData[index].sFundGroupds"> -->
                  <div class="input-group right_tooltip cell">
                    <div id="sFundGroupds"></div>
                    <input class="input-width" [(ngModel)]="listData[index].sFundGroupdsZh" name="sFundGroupdsZh" disabled (ngModelChange)="inputChange(index,listData[index].sFundGroupdsZh,'sFundGroupdsZh')">
                    <div class="input-group-addon" (click)="showApplyQDIIName(index)">
                      <i class="fa fa-search"></i>
                    </div>
                  </div>

                </td>

                <td>
                  <div class="cell">
                    <div id="f1"></div>
                    <input class="input-width" maxlength="100" name="f1" [(ngModel)]="listData[index].f1" (ngModelChange)="inputChange(index,listData[index].f1,'f1')">
                  </div>
                </td>
                <td>
                  <div class="cell">
                    <div id="f3"></div>
                    <input class="input-width" maxlength="100" name="f3" [(ngModel)]="listData[index].f3" (ngModelChange)="inputChange(index,listData[index].f3,'f3')">
                  </div>
                </td>
                <td  style="width:169px !important" [attr.title]="listData[index].f4Zh">
                  <div class="cell">
                    <div id="f4"></div>
                    <!-- <input class="input-width" maxlength="100" name="f4" [(ngModel)]="listData[index].f4" (ngModelChange)="inputChange(index,listData[index].f4,'f4')"> -->
                    <select class="select-margin input-width" [(ngModel)]="listData[index].f4" name="f4" (ngModelChange)="inputChange(index,listData[index].f4,'f4')">
                      <option [value]="''" selected="selected">--请选择--</option>
                      <option [value]="it.sItemKey" *ngFor="let it of dictionaryList.RISK_BOOLMBERG_CONTROL">{{it.sItemValue}}</option>
                    </select>
                  </div>
                </td>
                <td>
                  <div class="cell">
                    <div id="f5"></div>
                    <input class="input-width" maxlength="100" name="f5" [(ngModel)]="listData[index].f5" (ngModelChange)="inputChange(index,listData[index].f5,'f5')">
                  </div>
                </td>
                <td>
                  <div class="cell">
                    <div id="f6"></div>
                    <input class="input-width" maxlength="100" name="f6" [(ngModel)]="listData[index].f6" (ngModelChange)="inputChange(index,listData[index].f6,'f6')">
                  </div>
                </td>
                <td style="width:130px !important">
                  <div class="cell">
                    <div id="f7"></div>
                    <input class="input-width" maxlength="100" name="f7" [(ngModel)]="listData[index].f7" (ngModelChange)="inputChange(index,listData[index].f7,'f7')">
                  </div>
                </td>
                <td style="width:130px !important">
                  <div class="cell">
                    <div id="f8"></div>
                    <input class="input-width" name="f8" maxlength="100" [(ngModel)]="listData[index].f8" (ngModelChange)="inputChange(index,listData[index].f8,'f8')">
                  </div>
                </td>
                <td>
                  <div class="cell">
                    <div id="f9"></div>
                    <input class="input-width" maxlength="100" name="f9" [(ngModel)]="listData[index].f9" (ngModelChange)="inputChange(index,listData[index].f9,'f9')">
                  </div>
                </td>
                <td>
                  <div class="cell">
                    <div id="f10"></div>
                    <input class="input-width" maxlength="100" name="f10" [(ngModel)]="listData[index].f10" (ngModelChange)="inputChange(index,listData[index].f10,'f10')">
                  </div>
                </td>
              </tr>
            </tbody>

          </table>
        <!-- </div> -->
        <!-- <div class="ibt-table-fixed-content">
          <table id="input-table" class="table table-bordered table-hover table-striped table-keep-line">
            <thead>
              <tr>
                <th>
                  <div class="cell" style="width:50px !important">
                    <div class="checkbox checkbox-primary">
                      <input type="checkbox" id="isCheckedAll" [(ngModel)]="isCheckedAll" name="isCheckedAll" (ngModelChange)="checkedAll()">
                      <label>
                      </label>
                    </div>
                  </div>
                </th>
                <th>
                  <div class="cell cell-padding">序号</div>
                </th>
                <th>
                  <div class="cell cell-padding">编号</div>
                </th>
                <th>
                  <div class="cell">是否有效</div>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let item of listData;let index = index;">
                <td>
                  <div class="cell" style="width:50px !important">
                    <div class="checkbox checkbox-primary">
                      <input type="checkbox" name="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll()">
                      <label>
                      </label>
                    </div>
                  </div>
                </td>
                <td class="td-padding">
                  {{index+1}}
                </td>
                <td>
                  <div class="cell">
                    {{item.nQdId}}
                  </div>
                </td>
                <td>
                  <div class="cell">
                    <div id="sValid"></div>
                    <select class="select-margin input-width" [(ngModel)]="listData[index].sValid" (ngModelChange)="inputChange(index,listData[index].sValid,'sValid')">
                      <option [value]="1">有效</option>
                      <option [value]="0">无效</option>
                    </select>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </div> -->
      </div>
      <!-- <div class="box-footer clearfix" style="width:100%;">
        <app-pagination [currentPageNum]="listPageInfo.currentPageNum" [pagesShow]="" [totalPages]="listPageInfo.totalPages" (pageChanged)="pageNavigation($event)">
          <div class="pull-left pagination-detail" data-pagination-additional="true">
            <span class="pagination-info">
              当前显示第{{listPageInfo.startRow}}到第{{listPageInfo.endRow}}条，总共{{listPageInfo.total}}条，
            </span>
            <span class="page-list">
              每页记录
              <span class="btn-group dropup">
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                  <span class="page-size">{{listPageInfo.pageSize}}</span>
                  <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" role="menu">
                  <li *ngFor="let i of listPageInfo.pageList" role="menuitem" [class.active]="listPageInfo.pageSize === i" (click)="sizeChange(i)">
                    <a>{{i}}</a>
                  </li>
                </ul>
              </span>
              条
            </span>
          </div>
        </app-pagination>
      </div> -->
    </div>

    <div class="modal-footer">
      <button type="button" class="btn btn-default pull-left" data-dismiss="modal">退出</button>
      <button type="button" class="btn btn-primary" (click)="save()">
        <i class="fa fa-save"></i>保存</button>
      <button type="button" class="btn btn-primary" (click)="submit()">
        <i class="fa fa-save"></i>保存并提交</button>
    </div>
  </div>
</div>


<!-- 保存并提交modal -->
<div class="modal modal-detail" id="entryCommitModal">
  <div #entryCommitModal></div>
</div>

<!-- 适用QDII名称modal -->
<div class="modal modal-detail" id="applyQDIIName">
  <div #applyQDIIName></div>
</div>